import java.util.Random;
import java.util.Scanner;
//随机数
public class Test {
    public static void main(String[] args) {
        Random random = new Random();
        int randNum = random.nextInt(100);
        System.out.println(randNum);
    }
    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        float a = scan.nextFloat();
        System.out.println(a);

        scan.nextLine();
        Scanner scnn= new Scanner(System.in);
        String b = scan.nextLine();
        System.out.println(b);
        scan.close();

    }
    //输出
    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);

        int age = scan.nextInt();
        System.out.println(age);
        scan.close();
        Scanner scn = new Scanner(System.in);
        String name =scan.nextLine();
        System.out.println(name);
        scan.close();


    }

    //计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值
    public static void main7(String[] args) {
        // 1/1+1/2+1/3...1/100;
        double sum=0;
        int flg=1;
        for(int i=1;i<=100;i++){
            sum=sum+1*1.0/i*flg;
            flg=-flg;
        }
        System.out.println(sum);

    }
    // 求 20 40 之间的最大公约数;
    public static void main6(String[] args) {
        int a=40;
        int b=20;
        int c=a%b;//c=6
            if(c!=0){
            a=b;//a=18
            b=c;//b=6
               if(a%b==0){
                System.out.println(c+"是最大公约数");
            }
        }else if(c==0){
                System.out.println(b+"是最大公约数");
            }

    }
    public static void main5(String[] args) {
        //1~100中出现9的次数 9 19 29 39.....99
        int count = 0;
        for (int i = 1; i < 100; i++) {

            if (i % 10 == 9) {
                count++;
            }
            if (i / 10 == 9) {
                count++;
        }
        }
        System.out.println(count);
    }

    public static void main4(String[] args) {
        for (int year = 1000; year <= 2000; year++) {
            if (year % 4 == 0) {
                if (year % 100 != 0 || year == 2000) {
                    System.out.println(year+"是闰年");
                } else {
                    //System.out.println("不是闰年");
                }
            } else {
                if (year % 400 == 0) {
                    System.out.println(year+"是闰年");
                } else {
                    //System.out.println("不是闰年");
                }
            }
        }
    }
    //输出1000-2000之间的闰年;
    public static void main3(String[] args) {
        for(int i=1000;i<=2000;i++){

         if(i % 4 == 0 && i % 100!=0){
             System.out.println(i+"是闰年");

         }else if (i % 400 ==0){
             System.out.println(i+"是闰年");
         }
        }
    }
    public static void main2(String[] args) {
        for (int x = 2; x <= 100; x++) {
            //7
            int i = 1;
            for (i = 2; i <= x - 1; i++) {

                if (x % i == 0) {
                    // System.out.println("不是素数");
                    break;
                }
            }
            if (i > x - 1) {
                System.out.println(x + "是素数");
            }

        }
    }
    }
    /*public static void main1(String[] args) {
        //1.计算当前i的几位数（i=123）
        for(int i=0 ;i<999999;i++){
            int count=0;
            int tmp=i;
            while(tmp!=0){
                tmp/=10;
                count++; //count=3
            }
            //2.求和
            tmp=i;
            int sum=0;
            while(tmp!=0){//123
                sum+=Math.pow(tmp%=10,count);//3,2,1
                tmp/=10;//12
            }
            //3.判断
            if(sum==i){
                System.out.println(sum);
            }

        }
    }*/
